//
//  HEOldPelOrgModel.m
//  HealthFamily
//
//  Created by 吴欧 on 2020/11/26.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import "HEOldPelOrgModel.h"

@implementation HEOldPelOrgModel

- (NSString *)Kdistace {
    if (!_Kdistace) {
        _Kdistace = [DYTools distanceWithStringMTransformKm:_distance * 1000];
    }
    return _Kdistace;
}

- (NSString *)KPrice {
    if (!_KPrice) {
        _KPrice = [NSString stringWithFormat:@"￥%@/月", _sfqj.qmui_trim];
    }
    return _KPrice;
}

- (CGFloat)KScore {
    if (!_KScore) {
        _KScore = roundf(_pf / 20.0);
    }
    return _KScore;
}

- (NSString *)KBedStr {
    if (!_KBedStr) {
        _KBedStr = [NSString stringWithFormat:@"床位：%@", _cw];
    }
    return  _KBedStr;
}

- (CGFloat)KBedW {
    if (!_KBedW) {
        _KBedW = [self.KBedStr widthForFont:DYBlodFont(15)] + 10;
    }
    return _KBedW;
}

- (NSString *)KPhone {
    if (!_KPhone) {
        _KPhone = [NSString stringWithFormat:@"电话：%@", _gddh];
    }
    return _KPhone;
}

- (CGFloat)KPhoneW {
    if (!_KPhoneW) {
        _KPhoneW = [self.KPhone widthForFont:DYBlodFont(15)] + 10;
    }
    return _KPhoneW;
}

- (NSArray *)KPhotoArr {
    if (!_KPhotoArr) {
        _KPhotoArr = [_tjzs componentsSeparatedByString:@","];
        
        NSMutableArray *urls = @[].mutableCopy;
        for (NSString *str in _KPhotoArr) {
            if (![DYTools isBlankString: str]) {
                [urls addObject: str];
            }
        }
        _KPhotoArr = urls;
    }
    return _KPhotoArr;
}

@end
